<?php


namespace app\admin\validate;


use think\Validate;

class Cost extends Validate
{
    //字段规则
    protected $rule = [
        'app_base_id' => 'require',
        'cost' => 'require'
    ];

    //验证器提示信息
    protected $message = [
        'app_base_id.require' => '请选择应用',
        'cost.unique' => '请输入成本'
    ];

    //使用场景
    protected $scene = [
        'add'  =>  ['app_base_id','cost'],
        'edit'   => ['app_base_id','cost'],
    ];
}